package com.chengyu.core.controller.home;

import com.chengyu.core.controller.UserBaseController;
import com.chengyu.core.domain.form.AccountSearchForm;
import com.chengyu.core.entity.CommonPage;
import com.chengyu.core.entity.CommonResult;
import com.chengyu.core.exception.ServiceException;
import com.chengyu.core.model.HomeConfig;
import com.chengyu.core.model.UmsMemberAccountLog;
import com.chengyu.core.service.funds.MemberAccountLogService;
import com.chengyu.core.service.homeFloor.HomeFloorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.List;

/**
 * @title  首页显示
 * @author LeGreen
 * @date   2021/1/9
 */
@Api(tags = "")
@Controller
@RequestMapping("/common")
public class HomeFloorController extends UserBaseController {
	
	@Autowired
	private HomeFloorService homeFloorService;

	@ApiOperation(value = "获取首页楼层配置信息")
	@ResponseBody
	@RequestMapping(value="/home/floor", method=RequestMethod.GET)
	public CommonResult<List<HomeConfig>> getList() throws ServiceException {
		List<HomeConfig> homeConfigs = homeFloorService.listHomeFloorConfig(null, 1, Integer.MAX_VALUE);
		return CommonResult.success(homeConfigs);
	}
}